package com.firebird.app.fekpsl.ui.activity.sword

import android.content.Intent
import android.os.Bundle
import com.firebird.app.fekpsl.R
import com.firebird.app.fekpsl.base.BaseTbActivity
import com.firebird.app.fekpsl.ui.activity.sword.rank.EvaluationRankActivity
import com.firebird.app.fekpsl.ui.activity.sword.rank.FanRankActivity
import com.firebird.app.fekpsl.ui.activity.sword.rank.PassThoughRankActivity
import com.firebird.app.fekpsl.ui.activity.sword.rank.MemberRandRankActivity
import kotlinx.android.synthetic.main.layout_toolbar.*
import kotlinx.android.synthetic.main.sword_rank.*

class SwordRankActivity  : BaseTbActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.sword_rank)
        initView()
        initListener()
    }
    private fun initListener() {
        mEvaluationTop.setOnClickListener {
            Intent(this, EvaluationRankActivity::class.java).run {
                startActivity(this)
            }
        }
        mMemberRandTop.setOnClickListener {
            Intent(this, MemberRandRankActivity::class.java).run {
                startActivity(this)
            }
        }
        mPassThroughTop.setOnClickListener {
            Intent(this, PassThoughRankActivity::class.java).run {
                startActivity(this)
            }
        }
        mFanTop.setOnClickListener {
            Intent(this, FanRankActivity::class.java).run {
                startActivity(this)
            }
        }
    }

    fun initView(){
        initViewTitle()
    }
    fun initViewTitle(){
        val drawable = resources.getDrawable(R.drawable.back)
        drawable.setBounds(0, 0, 120, 120)
        tv_back.setCompoundDrawables(drawable, null, null, null)
        setBack()
        val titleName = this.resources.getText(R.string.top_kind) as String
        setTitle(titleName)
    }
}
